<template>
  <div class="row justify-content-center">
    <div class="col-8">
      <div v-if="roomBroker">
        <h2 class="jh-entity-heading" data-cy="roomBrokerDetailsHeading"><span>RoomBroker</span> {{ roomBroker.id }}</h2>
        <dl class="row jh-entity-details">
          <dt>
            <span>Name</span>
          </dt>
          <dd>
            <span>{{ roomBroker.name }}</span>
          </dd>
          <dt>
            <span>Server Age</span>
          </dt>
          <dd>
            <span>{{ roomBroker.serverAge }}</span>
          </dd>
          <dt>
            <span>Trade Record</span>
          </dt>
          <dd>
            <span>{{ roomBroker.tradeRecord }}</span>
          </dd>
          <dt>
            <span>Appraise</span>
          </dt>
          <dd>
            <span>{{ roomBroker.appraise }}</span>
          </dd>
          <dt>
            <span>Contact</span>
          </dt>
          <dd>
            <span>{{ roomBroker.contact }}</span>
          </dd>
          <dt>
            <span>Rates</span>
          </dt>
          <dd>
            <span>{{ roomBroker.rates }}</span>
          </dd>
        </dl>
        <button type="submit" v-on:click.prevent="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
          <font-awesome-icon icon="arrow-left"></font-awesome-icon>&nbsp;<span> Back</span>
        </button>
        <router-link
          v-if="roomBroker.id"
          :to="{ name: 'RoomBrokerEdit', params: { roomBrokerId: roomBroker.id } }"
          custom
          v-slot="{ navigate }"
        >
          <button @click="navigate" class="btn btn-primary">
            <font-awesome-icon icon="pencil-alt"></font-awesome-icon>&nbsp;<span> Edit</span>
          </button>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script lang="ts" src="./room-broker-details.component.ts"></script>
